package com.gxa.controller;

import com.gxa.service.SmsService;
import com.gxa.utils.Result;
import com.gxa.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lch
 * @date 2024/3/25 15:59
 * @description 发送短信
 **/
@RestController
public class SmsController {

    @Autowired
    private SmsService smsService;


    /**
     * 发送验证码
     * @param phone
     * @return
     */
    @GetMapping("/sms/login")
    public Result sendOneLoginSms(String phone){

        return ResultUtils.buildSuccess(this.smsService.sendSms(phone));
    }

}
